package com.ruoyi.basedata.domain;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;

import java.io.Serializable;
import java.util.Date;

/**
 * 小过户记录对象 t_user_change_xb_log
 *
 * @author TsingYu
 * @date 2024-07-13
 */
@TableName("t_user_change_xb_log")
@Builder
@Data
@AllArgsConstructor
@NoArgsConstructor
public class UserChangeXbLog implements Serializable {

    private static final long serialVersionUID = 6687713214672428385L;
    /**
     * 自增主键
     */
    @TableId("id")
    private Long id;

    /**
     * 设备编号
     */
    @Excel(name = "设备编号")
    @TableField("terminal_id")
    private String terminalId;

    /**
     * 原用户编号
     */
    @Excel(name = "原用户编号")
    @TableField("old_user_id")
    private String oldUserId;

    /**
     * 现用户编号
     */
    @Excel(name = "现用户编号")
    @TableField("user_id")
    private String userId;

    /** 创建者 */
    @TableField("create_by")
    private String createBy;

    /** 创建时间 */
    @TableField("create_time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.JSON_STYLE)
                .append("id", getId())
                .append("terminalId", getTerminalId())
                .append("oldUserId", getOldUserId())
                .append("userId", getUserId())
                .append("createTime", getCreateTime())
                .append("createBy", getCreateBy())
                .toString();
    }
}
